//
//  BaseViewControler.h
//  Weike
//
//  Created by leirz on 14-6-3.
//  Copyright (c) 2014年 winupon. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface BaseViewController : UIViewController

// 该属性需在viewDidDisappear做逻辑判断，可用与解除通知注册
@property(nonatomic,readonly) BOOL isPopControler;
@property(nonatomic,readonly) BOOL isVisible;
@property(nonatomic) BOOL needSystemTitleView;//title 是不是用系统的title，对于延迟加载的title，这里是Yes

@property(nonatomic) BOOL hasKeyBoardShow;//要不要接受键盘弹出/收回的通知,输入框会遮盖的就需要hasKeyBoardShow=no,默认键盘高度280

//键盘变化通知,子类复写方法即可
-(void)onkeyBoardChange:(NSNotification *)notification;
/**
 *  当多级返回，该方法会执行，可用于解除通知注册(popToViewController:animated)
 */
- (void)destory;

- (void)hideInput;

- (NSString *)description;

/**
 *  请求网络数据
 */
- (void)requestData;


//子类的textfield 或者textview 要实现自己的下面delegate方法的话,最好调用一下super的delegate方法,同时hasKeyBoardShow=yes,这样输入区域的高度就会随着键盘变化,要是hasKeyBoardShow=no,默认键盘高度280
- (void)textFieldDidBeginEditing:(UITextField *)textField;

- (BOOL)textFieldShouldReturn:(UITextField *)textField;

- (void)textFieldDidEndEditing:(UITextField *)textField;

- (void)textFieldDidChange:(UITextField *)textField;

//------------------ textview ----------------------
- (void)textViewDidBeginEditing:(UITextView *)textView;

- (void)textViewDidEndEditing:(UITextView *)textView;


@end

